home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Mail / PopOver.v1.5 / POP3Server / InstallingAMailServer.rtfd / popper.install < prev    next >
Text File  |  1996-03-25  |  2KB  |  91 lines

  1. #!/bin/csh -u
  2. #
  3. # This is a shell script to set up popper
  4. # It is intended to be called
  5. # only ONCE, and can cause system failure if executed 
  6. # several times.
  7. #
  8. # Created:
  9. #   04-20-94 Jason Fosback
  10. # Last modified:
  11. #   04-20-94 Jason Fosback
  12. #    Created script file
  13. #   03-26-96 Jason Fosback
  14. #    Enforced finding the server before proceeding
  15. #
  16.  
  17. set POPPERDIR = /usr/local/etc
  18. set DATE = `/bin/date`
  19. set INETFILE = /etc/inetd.conf
  20. set TMPSERVICES = /tmp/services
  21. set NIDOMAIN = .
  22.  
  23. #
  24. # Check to see if we're root
  25. #
  26. if (`/usr/ucb/whoami` == 'root') then
  27.     echo 'Beginning popper installation...'
  28.  
  29. else    echo 'You must be root in order to install popper.'
  30.     echo 'Log in as root, and try running this script again.'
  31.     exit 1
  32. endif
  33.  
  34. #
  35. # Create the necessary directories for popper
  36. #
  37. echo Creating popper directory: $POPPERDIR...
  38. /bin/mkdirs $POPPERDIR
  39.  
  40. #
  41. # Check for the existance of popper
  42. #
  43. if ( -e /tmp/InstallingAMailServer.rtfd/popper ) then
  44.     echo 'Found popper executable...'
  45. else
  46.     echo 'You must copy InstallingAMailServer.rtfd to /tmp before proceeding.'
  47.     exit 1
  48. endif
  49.  
  50. #
  51. # Copy popper to the correct place
  52. #
  53. echo Copying popper to $POPPERDIR...
  54. cp -p /tmp/InstallingAMailServer.rtfd/popper $POPPERDIR
  55.  
  56. #
  57. # Add the appropriate information to the inetd.conf file
  58. #
  59. echo Adding POP services to $INETFILE...
  60. echo '' >> $INETFILE
  61. echo "# Pop servers.  Added $DATE" >> $INETFILE
  62. echo "pop    stream    tcp    nowait    root    $POPPERDIR/popper    popper" >> $INETFILE
  63. echo "pop3    stream    tcp    nowait    root    $POPPERDIR/popper    popper" >> $INETFILE
  64.  
  65. #
  66. # Dump netinfo information about services
  67. #
  68. echo Dumping netinfo information about services...
  69. /usr/bin/nidump services $NIDOMAIN > $TMPSERVICES
  70.  
  71. #
  72. # Add pop3 to our list of services
  73. echo Adding POP3 to list of services...
  74. echo "pop3    110/tcp" >> $TMPSERVICES
  75.  
  76. #
  77. # Load netinfo services
  78. #
  79. echo Loading services back into netinfo...
  80. /usr/bin/niload services $NIDOMAIN < $TMPSERVICES
  81.  
  82. #
  83. # We're finished
  84. #
  85. echo ''
  86. echo ''
  87. echo 'Installation complete.  You must reboot your system for the changes'
  88. echo 'to take effect.'
  89.  
  90.  
  91.